package com.JdkProxy.firstexample;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @User c.c
 * @Since 2022/10/24
 * @Time 9:40
 * @Description
 */

public class JDKDynamicProxy implements InvocationHandler {
  private Object bean;

  public JDKDynamicProxy(Object bean) {
    this.bean = bean;
  }

  public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

    return method.invoke(bean,args);
  }
}
